home *** CD-ROM | disk | FTP | other *** search
- Path: arapaho.cse.ucsc.edu!ray
- From: ray@cse.ucsc.edu (Ray Swartz)
- Newsgroups: comp.lang.c++
- Subject: Friend declarations
- Date: 29 Mar 1996 19:55:59 GMT
- Organization: UC Santa Cruz CIS/CE
- Message-ID: <4jhf8f$s19@darkstar.UCSC.EDU>
- NNTP-Posting-Host: arapaho.cse.ucsc.edu
- X-Newsreader: TIN [version 1.2 PL2]
-
- Does the declaration of a friend function inside a class declaration
- constitute a visible declaration of the friend function?
-
- Here is sample code:
-
- class X {
- // ...
- friend int f(int, int);
- };
-
- Question: is f() now declared for use in a program or does there
- have to be a global scope declaration:
-
- int f(int, int);
-
- too?
-
-
- Thanks,
-
- Ray Swartz
-